package com.hbnu.system.core.model.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class BaseTreeEntity<T> {

    /**
     * ID=0, 表示第一条记录
     */
    @ApiModelProperty(value = "主键")
    String id;

    @ApiModelProperty(value = "父级节点Id。根节点设为0")
    String parentId;

    @ApiModelProperty(value = "排序")
    Double sort;

    @ApiModelProperty(value = "层级。根节点层级为0")
    String levelCode;

    @ApiModelProperty(value = "children")
    List<T> children = new ArrayList<>();
}
